Java -- String. split () function, javastring. splitIn java doc, there are String [] java. lang. String. split (String regex)
Splits this string around matches of the given regular expression.
This method works as if by invoking the
Before in the http://shukuiyan.iteye.com/blog/507915 article has already described this problem, but in the last written examination actually met this knowledge point, but also did wrong, embarrassed! The Apprentice is not fine. The topic is
Split is a common function in Java. It split a full string to an array based on Delimeter.For example, Split ' A:b:c ' with ': ' results in [A, B, c]In some scenario, it's better to keep the delimeter instead for discard it while splitting.Here is
It is believed that many of the first-line developers have encountered split lines, one of the most common elements of visual design, although simple and easy to draw, but in layout and typesetting often affect the view hierarchy of the important
Use in common to perl,python,awk,r, although Java,c,c++,vala also learned but do not like, you say how to do.It seems the life of the script.Perl@rray = split/pattern/, STRING, LIMITYou can see that split consists of 2 parts (String,pattern) and an
This split method of the Strig class has been used many times. I have referred to a lot of online materials and summarized it now.1: usage of the second parameter of the split FunctionI saw a problem on the Forum, and then I became interested in
There is a String.Split () method in the Java.lang package, which returns an arrayI use in the application of some, to summarize for you, for your reference only:1. If you use "." As a separate word, it must be written as follows, String.Split ("\ \"
The Split function in Java is used to segment a string by a specified character (string) or regular, and the result is returned as an array of strings;
For example:
[Java] view plain copy String str= "1234@ABC"; String[] A = Str.split
The String. split () method is also available in the java. lang package. Similar to. net, the return is a struct-type array, but there are some tips during use. I will introduce you as follows. For more information, see
For example, Run "2 | 33 | 4"
This article is reproduced and transferred from:Http://feigme.iteye.com/blog/147259
Java. Lang. String split
The string split method is to directly split the string according to the given string, for example
String value = "a,b,c,d,e"; String[
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.